
#ifndef __DATAPOINT_H__
#define __DATAPOINT_H__
#include "utils.h"

namespace com
{
    namespace dbscan
    {
        class DataPoint
        {
            private:
                int dataPointName;
                bool isKey;
                double dimension[3];

            public:
                inline int getDataPointName() const
                {
                    return dataPointName;
                }

                inline double *getDimension()
                {
                    return dimension;
                }

                inline const double *getDimension()const
                {
                    return dimension;
                }

                void setKey (bool isKey)
                {
                    this->isKey = isKey;
                }
                bool getIsKey() const
                {
                    return isKey;
                }

                DataPoint (double *dimension, int dataPointName, bool isKey) : dataPointName (dataPointName), isKey (isKey)
                {
                    memcpy (this->dimension, dimension, 3 * sizeof (double));
                }

                void printDimention() const
                {
                    for (int i = 0; i < 3; ++i)
                    {
                        cout << dimension[i] << " ";
                    }
                    cout << endl;
                }
        };
    }
}

#endif /*__DATAPOINT_H_*/